#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-
"""
@author:apple
@file:demo03.py
@time:2022/01/27
"""


# from tkinter import *
#
#
# def main():
#     ...
#     root = Tk()
#     w = Label(root,text = "hello,world")
#     w.pack()
#     root.mainloop()


def test01():
    ...
    opt = 10
    res = 12 if opt > 20 else 9
    print(res)

    try:
        ...
        # opt = 10 / 0

    except Exception as e:
        print('xxx:{0}'.format(e))
    else:
        print('no exception')
    finally:
        print('aaaa')


def test02():
    ...
    name = 'lisi'
    a, *_ = name
    print(a)
    opt = 1, 2, 3
    print(type(opt))
    x1, *a = 1, 2, 3
    print(x1, type(a))


def swap():
    a = 10
    b = 20
    (a, b) = (b, a)
    print(a, b)


def test03():
    ...
    a = 10
    b = 20
    [a, b] = b, a
    print(a, b)


def test04():
    ...
    persons = {'name': 'zhangsan', 'age': 21}
    for key, val in persons.items():
        print(key, val)

    l = [1, 2, 3, 4]
    p = l
    while l:
        ...
        first, l = l[0], l[1:]
        print(first)

    while p:
        ...
        first, *p = p
        print(first)


def test05():
    ...
    names = ['lisi', 'zhangsan', 'zhaoliu', 'tony']
    # first，other
    a, *o = names
    print(a, o)
    print(names[0], names[1:])
    *ot, b = names
    print(ot, b)
    print(names[:-1], names[-1])


def test06():
    ...
    opt = [1, 2, 3]
    tony = [4, 5, 6]
    # opt += tony
    opt.extend(tony)
    print(opt)
    tony[len(tony):] = [7, 8, 9]
    print(tony)


def test07():
    ...
    ages = (1, 2, 3)
    names = ('zhangs', 'li', 'wangwu')
    for key, val in zip(ages, names):
        print(key, val)

    person = dict(zip(ages, names))
    print(person)


def test08():
    ...
    name = 'lisi'

    for key, val in enumerate(name):
        print(key, val)

    input()


def test09():
    ...
    ages = [1,2,3]
    opt = iter(ages)
    print(opt)
    print(next(opt))
    print(next(opt))
    print(next(opt))


def test10():
    ...
    # 609e47a58a33ad7f1ebc5991d8f3aebe
    print(chr(0x60))
    print(chr(0x9e))
    print(chr(0x47))
    print(chr(0xa5))
    print(chr(0x8a))
    print(chr(0x33))
    print(chr(0xad))
    print(chr(0x7f))
    print(chr(0x1e))
    print(chr(0xbc))
    print(chr(0x59))
    print(chr(0x91))
    print(chr(0xd8))
    print(chr(0xf3))
    print(chr(0xae))
    print(chr(0xbe))


if __name__ == '__main__':
    pass
    # main()
    # test02()
    # swap()
    # test07()
    # test09()
    test10()